EXAMPLE SOURCE CODES


     This is a small collection of mostly game example source codes. These source codes are made available to help PlayBasic programmers kick start their game programming journey. Looking for more source code / tutorials & media, then remember to visit the PlayBasic Resource board on our forums.

Found #23 items in Games category by Kevin Picone

 Destructible Aliens From Space

By: Kevin Picone Added: March 21st, 2021

Category: All,Arcade,Games,Collision,Sprite Collision,Sprites


(Destructible) Aliens From Space - (2021-03-31 )

Destructible Aliens From Space is Space Invaders Styled game with destructible player , aliens and bunkers.. Destroy them pixel by pixel.




Download: Login to Download




 8Way Layered Star Field / Asteroids Style

By: Kevin Picone Added: December 30th, 2011

Category: All, Games, Effects, Videos

     This example creates a layered infinitely scrollable star field using shapes. The star field can move/wrap in all 8 directions, much like you'd see in Asteroids arcade style games.. Here we're using Shapes to batch render dots, rather than trying to brute force them individually


Download: Login to Download




 Tron

By: Kevin Picone Added: May 26th, 2011

Category: All,Games


     This example is simple tron/snake styled game where the players must control the dot without it crossing over the trail it leaves behind. The version of the game uses line intersection to suss out the potential collisions, rather than the normal map/pixel method.


Download: Login to Download




 Shoot The Alien

By: Kevin Picone Added: March 10th, 2010

Category: All, Beginner, Games


    This example is for of the CleverCoder challenge #19. The challenge was to create a space invader styles game, but limited the number of aliens to one.

     The code is bit long that need be really, as the code draws simple polygons to shape to represent the Alien / Player & Bullets. The polygons are then merged to shapes for collision detection between the various character types. I've tried to divide everything into groups of functions to separate everything as much as possible. Which in turn creates a little extra code, but is less error prone in longer projects.

     I've included two versions of the code, one is for the users using PlayBasic V1.63 Learning Edition, the other is for V1.64 retail users. The V1.64 version just takes advantage of some of the new compiler and graphics features found in retail editions, such as math operators and VSync support.

Download: Login to Download




 YAAC (Yet Another Asteroids Clone)

By: Kevin Picone Added: December 15th, 2009

Category: All,Games


     YAAC is more an Asteroids framework than a complete game. While it does include the basic player mechanics (controls, firing & collisions) as well as the asteroids controller code. It's not really tweaked up, It feel's ok, but the player is easily overwhelmed...

     Visually, the game uses additive effects on all items combined with buffer depreciation, which gives the trialing effect. Which have become common place in modern 'vector' games.

     The objective of the demo is really to help Beta test the PlayBasic V1.64k, as such the code uses a number of new features found only in that update..



Download: Login to Download




 Mario Demo

By: Kevin Picone Added: June 23rd, 2009

Category: All,Games,Platform,Collision


This example recreates a version of the Mario movement and control system. It includes simple animation, jumping/falling and collision with the environment.
Download: Login to Download




 Memory Game

By: Kevin Picone Added: April 7th, 2009

Category: All,Games,Beginners


This example is a version of the classic memory game, where you flip cards to find the matching pairs. Each time a pair is located, you're awarded a score. When all pairs are matched you win! Pretty simple game mechanic, but it can be a pretty enjoyable little game.



Download: Login to Download




 Rugby Demo

By: Kevin Picone Added: March 28th, 2009

Category: All,Games,2.5D


This example was original written at the start of 2006. It was originally developed using PlayBasic V1.20 (or so) and apart from a few parameters changes. The code is virtually the same. The demo was originally written as a proof of concept of sorts. While there's no game to speak of, the demo does show some methods that you can use to render perspective textured mapped scenes. Even in good old PlayBasic.
Download: Login to Download




Viewing Page [1] of [3]



Want More Source Codes?:



Release Type: The source code & tutorials found on this site are released as license ware for PlayBasic Users. No Person or Company may redistribute any file (tutorial / source code or media files) from this site, without explicit written permission.

 

 
     
 
       

(c) Copyright 2002 / 2024 Kevin Picone , UnderwareDesign.com  - Privacy Policy   Site: V0.99a [Alpha]